package fuxi02_finally.test_collection;

import java.util.LinkedList;

//      List 有序 可重复

public class LinkedListDemo {
    public static void main(String[] args) {
        LinkedList<String> linkedList = new LinkedList<>();
        linkedList.add("a");
        linkedList.add("a");
        linkedList.add("b");
        linkedList.add("w");
        linkedList.add("a");
        System.out.println(linkedList);

//        for循环打印
        for (int i=0; i<linkedList.size(); i++){
            System.out.println(linkedList.get(i));
        }
    }
}
